package com.blog.zs.action;

import com.blog.zs.Service.IloveyouService;
import com.blog.zs.model.Iloveyou;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ILoveYouAction extends ActionSupport{
	
	private Integer id;
	private String lovepassword;
	private Iloveyou ily;
	private IloveyouService ilyService;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getLovepassword() {
		return lovepassword;
	}
	public void setLovepassword(String lovepassword) {
		this.lovepassword = lovepassword;
	}
	public Iloveyou getIly() {
		return ily;
	}
	public void setIly(Iloveyou ily) {
		this.ily = ily;
	}
	public IloveyouService getIlyService() {
		return ilyService;
	}
	public void setIlyService(IloveyouService ilyService) {
		this.ilyService = ilyService;
	}
	
	public String Love(){
		ily = ilyService.login(lovepassword);
		if(ily==null){
			return "Error";
		}
		return SUCCESS;
	}
}
